package com.jd.system.mapper;

import com.jd.system.domain.Permission;
import com.jd.basic.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jd
 * @since 2023-03-09
 */
@Repository
public interface PermissionMapper extends BaseMapper<Permission> {

    Permission findBySn(String permissionSn);

    void addMiddle(@Param("roleId") Long id,@Param("permissions") List<Long> permissions);

    void deleteMiddleByPermissionId(Long id);

    List<String> findSNByLogininfoId(Long logininfoId);
}
